﻿<UserControl
    x:Class="CrateMayhem.WinRT.GameControls"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="400"
    d:DesignWidth="400">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition Height="100"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Button Grid.Row="0" Grid.Column="1" Style="{StaticResource MoveButtonStyle}" Command="{Binding MoveUpCommand}">
            <Image Source="{StaticResource UpArrowImage}" Stretch="None"/>
        </Button>
        <Button Grid.Row="1" Grid.Column="2" Style="{StaticResource MoveButtonStyle}" Command="{Binding MoveRightCommand}">
            <Image Source="{StaticResource RightArrowImage}" Stretch="None"/>
        </Button>
        <Button Grid.Row="2" Grid.Column="1" Style="{StaticResource MoveButtonStyle}" Command="{Binding MoveDownCommand}">
            <Image Source="{StaticResource DownArrowImage}" Stretch="None"/>
        </Button>
        <Button Grid.Row="1" Grid.Column="0" Style="{StaticResource MoveButtonStyle}" Command="{Binding MoveLeftCommand}">
            <Image Source="{StaticResource LeftArrowImage}" Stretch="None"/>
        </Button>
        <Button 
            Grid.Row="3" 
            Grid.ColumnSpan="3" 
            Style="{StaticResource MoveButtonStyle}" 
            Command="{Binding UndoCommand}"
            Width="150"
            Height="50"
            VerticalAlignment="Bottom">
            <TextBlock 
                HorizontalAlignment="Center" 
                Style="{StaticResource GameTextBlockStyle}" 
                FontSize="15" 
                Foreground="Black" 
                Text="Undo"/>
        </Button>
        <Button 
            Grid.Row="4" 
            Grid.ColumnSpan="3" 
            Style="{StaticResource MoveButtonStyle}" 
            Command="{Binding RetryCommand}"
            Width="150"
            Height="50">
            <TextBlock 
                HorizontalAlignment="Center" 
                Style="{StaticResource GameTextBlockStyle}" 
                FontSize="15" 
                Foreground="Black" 
                Text="Retry"/>
        </Button>
    </Grid>
</UserControl>
